package cn.edu.scau.cmi.suyaoxing.composite.safe;

public class SafeLeaf implements SafeComponent{
	private int index;
	@Override
	public String doSomething() {
		return "Leaf doSomething";
	}
	public SafeLeaf(int index) {
		this.index=index;
	}
	public int getIndex() {
		return this.index;
	}
	@Override
	public String toString() {
		return "个体"+this.getIndex();
	}
}
